package com.briup.ch07.interfaces;

/*
public class Test1 {
    public static void main(String[] args) {
        //IFly f1=new IFly();不能实例化对象
        System.out.println(IFly.NUM_X);
        System.out.println(ISleep.HOUR);
        Bird b=new Bird();
        b.fly();
        b.sleep();
        IFly b1=new Bird();
        b1.fly();
        //b1.sleep();//编译看左边，只能使用师傅里面的方法
        ISleep b2=new Bird();
        b2.sleep();
        System.out.println(b1.NUM_X);//不推荐因为是static
        System.out.println(Bird.NUM_X);
        System.out.println(IFly.NUM_X);
        b1.print();
        Yan y1=new Yan();
        y1.fly();
        y1.sleep();
        IAir y2=new Yan();//多态可以使用多个方法
        y2.fly();
        y2.sleep();
        IFly y3=new Yan();
        y3.print();

    }
}
*/
